<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery.dialog.css" />
		<link rel="stylesheet" href="css/index.css" />
		<title>办公自动化系统</title>
		<script type="text/javascript"
			src="${pageContext.request.contextPath }/js/jquery.js"></script>
	</head>

	<body>
		<div id="container">
			<div id="hd">
				<div class="hd-wrap ue-clear">
					<div class="top-light"></div>
					<h1 class="logo"></h1>
					<div class="login-info ue-clear">
						<div class="welcome ue-clear">
							<span class="user-name"><br>欢迎您,</span>
							<a id="id_name" 
							href="javascript:void(0);" class="user-name">${login_User.userName}</a>
						</div>
						<div class="login-msg ue-clear" id="id_msg">
							<a href="javascript:void(0);" class="msg-txt">消息</a>
							<a id="id_num" href="javascript:void(0);" class="msg-num">${num }</a>
						</div>
					</div>
					<div class="toolbar ue-clear">
						<a href="javascript:;" class="home-btn" id="id_home">首页</a>
						<a href="javascript:;" class="quit-btn exit"></a>
					</div>
				</div>
			</div>
			<div id="bd">
				<div class="wrap ue-clear">
					<div class="sidebar">
						<h2 class="sidebar-header">
							<p>
								功能导航
							</p>
						</h2>
						<ul class="nav">
							<!-- 循环遍历菜单 -->
							<c:forEach items="${sessionScope.menuMap }" var="menu">
								<li class="system">
									<div class="nav-header">
										<a href="javascript:;" class="ue-clear"><span>${menu.key}</span><i class="icon"></i>
										</a>
									</div>
									<ul class="subnav">
										<!-- 循环遍历子菜单 -->
										<c:forEach items="${menu.value }" var="mu">
											<li>
												<a href="javascript:;" date-src="${mu.menuUrl }">${mu.menuName }</a>
											</li>
										</c:forEach>
									</ul>
								</li>
							</c:forEach>
						</ul>
					</div>
					<div class="content">
						<iframe src="home.jsp" id="iframe" width="100%" height="100%"
							frameborder="0"></iframe>
					</div>
				</div>
			</div>
			<div id="ft" class="ue-clear">
				<div class="ft-left">
					<span>办公自动化</span>
					<em>Office&nbsp;System</em>
				</div>
				<div class="ft-right">
					<span>Automation</span>
					<em>V2.0&nbsp;2014</em>
				</div>
			</div>
		</div>
		<div class="exitDialog">
			<div class="dialog-content">
				<div class="ui-dialog-icon"></div>
				<div class="ui-dialog-text">
					<p class="dialog-content">
						你确定要退出系统？
					</p>
					<p class="tips">
						如果是请点击“确定”，否则点“取消”
					</p>

					<div class="buttons">
						<input type="button" class="button long2 ok" value="确定" />
						<input type="button" class="button long2 normal" value="取消" />
					</div>
				</div>

			</div>
		</div>
		<script type="text/javascript">
	$(function(){
		if(${num }==0){
			document.getElementById("id_num").style.display="none";
		}
		$("#id_name").click(function(){
			$("#iframe").attr("src","MessageManager.action?method=query");
		});
		$('#id_msg').click(function(){
			document.getElementById("id_num").style.display="none";
			$("#iframe").attr("src","receiveEmail.action?method=queryReceiveEmail");
		});
		$(function(){
			var data = $('.subnav a').text();
			///alert(data[34]);
			var size = data.length;
			$('.subnav a:contains("收")').click(function(){
					document.getElementById("id_num").style.display="none";	
			});
		});
		$("#id_home").click(function(){
			$("#iframe").attr("src","home.jsp");
		});
	});
</script>
	</body>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/common.js"></script>
	<script type="text/javascript" src="js/core.js"></script>
	<script type="text/javascript" src="js/jquery.dialog.js"></script>
	<script type="text/javascript" src="js/index.js"></script>

</html>
